<?php
//Author:炳南
//Data:2016-2-27

require 'basehandle.php';
require '../dao/userdao.php';

class Ubike implements basehandle{
	public function dohandle(){
		$uid=$_POST['uid'];
		$dao=new userdao();
 		$rs=$dao->ubike($uid);
 		//var_dump($rs);
		if(!empty($rs)){
			$info=array("rs"=>"success",
				"successinf"=>"登陆成功",
				"uid"=>$rs[0]['id'],
				"vip"=>$rs[0]['vip'],
				"ulevel"=>$rs[0]['ulevel'],
				"ucoin"=>$rs[0]['price']);
		}
		else{
			$info=array("rs"=>"error","errorinf"=>"登陆失败");
		}
		echo json_encode($info);
	}
	
}  
?>